﻿using AutoMapper;
using SupplierCustomerManagement.Domain.Entities;
using SupplierCustomerManagement.Write.API.Applications.Commands.suppliers;
using SupplierCustomerManagement.Write.API.Applications.Commands.bankaccounts;
using SupplierCustomerManagement.Write.API.Applications.Commands.servicepersonals;
using SupplierCustomerManagement.Write.API.Applications.Commands.suppliercontacts;
using SupplierCustomerManagement.Write.API.Applications.Commands.productpurchaseprices;
using SupplierCustomerManagement.Write.API.Applications.Commands.customers;

namespace SupplierCustomerManagement.Write.API.Automappers
{
    public class AutomapperProfiles : Profile
    {
        public AutomapperProfiles()
        {
            // 供应商相关映射
            CreateMap<AddSupplierCommand, Supplier>();

            // 银行账户相关映射
            CreateMap<AddBankAccountCommand, BankAccount>();
            CreateMap<UpdateBankAccountCommand, BankAccount>();

            // 服务人员相关映射
            CreateMap<AddServicePersonalCommand, ServicePersonnel>();
            CreateMap<UpdateServicePersonalCommand, ServicePersonnel>();

            // 供应商联系人相关映射
            CreateMap<AddSupplierContactCommand, SupplierContact>();
            CreateMap<UpdateSupplierContactCommand, SupplierContact>();

            // 商品采购价格相关映射
            CreateMap<AddProductPurchasePriceCommand, ProductPurchasePrice>();
            CreateMap<UpdateProductPurchasePriceCommand, ProductPurchasePrice>();

            // 客户相关映射
            CreateMap<AddCustomerCommand, Customer>();
        }
    }
}
